package cn.wusifx.zabbix.request.builder.mediatype;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.CreateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/mediatype/create
 */
class MediaTypeCreateRequestBuilder extends CreateRequestBuilder {
    private String description;
    private Integer type;
    public MediaTypeCreateRequestBuilder(String auth) {
        super("mediatype.create", auth);
    }

    public MediaTypeCreateRequestBuilder(Long id, String auth) {
        super("mediatype.create", id, auth);
    }

    public String getDescription() {
        return description;
    }

    public MediaTypeCreateRequestBuilder setDescription(String description) {
        this.description = description;
        return this;
    }

    public Integer getType() {
        return type;
    }

    public MediaTypeCreateRequestBuilder setType(Integer type) {
        this.type = type;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("description",description);
        baseRequest.getParams().put("type",type);
        return baseRequest;
    }
}